]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Hide the group containing the windows while overlay is up
authorOwen Taylor <otaylor@src.gnome.org>
Sat, 8 Nov 2008 19:33:33 +0000 (19:33 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Sat, 8 Nov 2008 19:33:33 +0000 (19:33 +0000)
When we are animating the overlay, we don't want to be continually
redrawing the (obscured) window actors.

src/shell-global.c: Add 'window-group' property to expose the group
  holding the window actors.
js/ui/overlay.js: Hide the window group while the overlay is up.

svn path=/trunk/; revision=39

js/ui/overlay.js
src/metacity-symbols.c
src/shell-global.c

index f2acec05619882c51cc4e15cb474fdee8a467c7d..2f99e2f8dbc167ec0eecfe5e269260290c13cae6 100644 (file)
@@ -103,13 +103,24 @@ Overlay.prototype = {
                window_index++;
            }
 
+           // All the the actors in the window group are completely obscured,
+           // hiding the group holding them while the overlay is displayed greatly
+           // increases performance of the overlay especially when there are many
+           // windows visible.
+           //
+           // If we switched to displaying the actors in the overlay rather than
+           // clones of them, this would obviously no longer be necessary.
+           global.window_group.hide()
            this._group.show();
        }
     },
 
     hide : function() {
        if (this.visible) {
+           let global = Shell.global_get();
+
            this.visible = false;
+           global.window_group.show()
            this._group.hide();
 
            for (let i = 0; i < this._window_clones.length; i++) {
index c4c069fdea2602547f8b71dc69d09919ea5ecb44..d8497a33df1c883c0f8e8a908c2e48f588f0d20a 100644 (file)
@@ -39,6 +39,12 @@ mutter_plugin_get_screen (MutterPlugin *plugin)
   return NULL;
 }
 
+ClutterActor *
+mutter_plugin_get_window_group (MutterPlugin *plugin)
+{
+  return NULL;
+}
+
 Display *
 meta_display_get_xdisplay (MetaDisplay *display)
 {
index 6a95b34b28b4b4f83445af97a72ccdad0fd39b51..6f141057590ec70beb3eef03a4bdfe673d349366 100644 (file)
@@ -14,7 +14,8 @@ enum {
   PROP_OVERLAY_GROUP,
   PROP_SCREEN_WIDTH,
   PROP_SCREEN_HEIGHT,
-  PROP_STAGE
+  PROP_STAGE,
+  PROP_WINDOW_GROUP
 };
 
 /* Signals */
@@ -75,6 +76,9 @@ shell_global_get_property(GObject         *object,
     case PROP_STAGE:
       g_value_set_object (value, mutter_plugin_get_stage (global->plugin));
       break;
+    case PROP_WINDOW_GROUP:
+      g_value_set_object (value, mutter_plugin_get_window_group (global->plugin));
+      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
@@ -141,6 +145,13 @@ shell_global_class_init (ShellGlobalClass *klass)
                                                         "Stage holding the desktop scene graph",
                                                         CLUTTER_TYPE_ACTOR,
                                                         G_PARAM_READABLE));
+  g_object_class_install_property (gobject_class,
+                                   PROP_WINDOW_GROUP,
+                                   g_param_spec_object ("window-group",
+                                                        "Window Group",
+                                                        "Actor holding window actors",
+                                                        CLUTTER_TYPE_ACTOR,
+                                                        G_PARAM_READABLE));
 }
 
 /**